﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlDoiMatKhauNPP.ascx.cs"
    Inherits="UserControl_ControlDoiMatKhauNPP" %>
<%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dxpc" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<script type="text/javascript">
    function pageLoad() {
        $("#<%= imgBtnSave.ClientID %>").click(function () {
            if ($("#<%= txtNewPass.ClientID %>").val().length > 0 && $("#<%= txtNewPass.ClientID %>").val() == $("#<%= txtConfirm.ClientID %>").val()) {
                $.blockUI({ css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#000',
                    '-webkit-border-radius': '10px',
                    '-moz-border-radius': '10px',
                    opacity: .5,
                    color: '#fff'
                }
                });
            }
    });
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
    function EndRequestHandler(sender, args) {
        $.unblockUI();
    }
    }
</script>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div class="direct_container_right_titletop">
            Đổi mật khẩu
        </div>
        <hr />
        <!-- Button chuc nang-->
        <div class="direct_container_main">
            <asp:ImageButton ID="imgBtnSave" ImageUrl="~/Images/save.png" Width="32px" Height="32px"
                runat="server" OnClick="imgBtnSave_Click" />
        </div>
        <!-- End Button chuc nang-->
       
                    <!-- Content main-->
                    <div class="direct_container_main" >
                        <div class="direct_container_form_right" style="min-height:220px">
                            <table border="0" width="100%">
                                <tr>
                                    <td align="right" width="10%">
                                        <p class="direct_label">
                                            Tên đăng nhập</p>
                                    </td>
                                    <td align="left" width="90%">
                                        <asp:TextBox ID="txtMaSo" ReadOnly="true" CssClass="input_code" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <p class="direct_label">
                                            Họ tên</p>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="txtName" ReadOnly="true" CssClass="input_full" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <p class="direct_label">
                                            Mật khẩu cũ</p>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="txtOldPass" TextMode="Password" CssClass="input_full" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <p class="direct_label">
                                            Mật khẩu mới</p>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="txtNewPass" TextMode="Password" CssClass="input_full" runat="server"></asp:TextBox>
                                       
                                        <asp:RequiredFieldValidator ID="valRequireNewPassword" runat="server" ControlToValidate="txtNewPass" Display="None" ErrorMessage="Nhập mật khẩu mới"></asp:RequiredFieldValidator>
                                         <cc1:ValidatorCalloutExtender TargetControlID="valRequireNewPassword" ID="ValidatorCalloutExtender2" runat="server" Enabled="True">
                                        </cc1:ValidatorCalloutExtender>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <p class="direct_label">
                                            Xác nhận</p>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="txtConfirm" TextMode="Password" CssClass="input_full" runat="server"></asp:TextBox>
                                         <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtConfirm" ControlToCompare="txtNewPass" Display="None"  ErrorMessage="Mật khẩu không trùng" />
                                        <cc1:ValidatorCalloutExtender TargetControlID="CompareValidator1" ID="ValidatorCalloutExtender3" runat="server" Enabled="True">
                                        </cc1:ValidatorCalloutExtender>
                                    </td>
                                </tr>
                               
                            </table>
                        </div>
                    </div>
                    <!-- EndContent main-->
               <dxpc:ASPxPopupControl ID="MessageBox" PopupHorizontalAlign="WindowCenter"  PopupVerticalAlign="WindowCenter" Font-Bold="true" HeaderText="DRM-S" runat="server" Height="91px" 
        Width="601px">
        <ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True"></dxpc:PopupControlContentControl>
</ContentCollection>
    </dxpc:ASPxPopupControl>

    </ContentTemplate>
</asp:UpdatePanel>
